public class MemRelated {

    /**This programe is built to discribe the differences
     * between 'String =' and 'New String'
     */
    public static void main(String[] args){

        String s1 = "abc";
        String s2 = "abc";
        System.out.println(s1 == s2);
        String s3 = s1;
        s3 = "abcd";
        System.out.println(s1 == s3);
        

        String s4 = new String("abc");
        String s5 = new String("abc");
        String s6 = s5;
        System.out.println(s4 == s5);
        s6 = "abcd";
        System.out.println(s5 == s6);


    }
    
}